package com.yizhang.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import com.yizhang.service.MvcService;

import java.io.FileInputStream;
import java.io.FileNotFoundException;

@Controller
public class MvcController {

    @Autowired
    private MvcService mvcService;

    @GetMapping("/test1")
    public String test1() {
        mvcService.show();
        return "/index.jsp";
    }

    @GetMapping("/test2")
    public String test2() throws FileNotFoundException {
        FileInputStream fileInputStream = new FileInputStream("c:/xxx.java");
        return "/index.jsp";
    }
}
